From: Alejandro PiƱeiro Date: Fri, 16 Mar 2012 16:17:23 +0000 (+0100) Subject: a11y: setting the proper role/label_actor for SearchResult.content X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6524 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=94493cde354d1acbc96aedc7ed12eb4e2cd81506;p=gnome-shell.git a11y: setting the proper role/label_actor for SearchResult.content role/label_actor should be used for the actor that will receive the focus. In some cases it was also (wrongly) set on the container, so using an AT like Orca, it exposed both. https://bugzilla.gnome.org/show_bug.cgi?id=672242 --- diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js index 0a3229257..fb1ca73e0 100644 --- a/js/ui/searchDisplay.js +++ b/js/ui/searchDisplay.js @@ -5,6 +5,7 @@ const Lang = imports.lang; const Gtk = imports.gi.Gtk; const Meta = imports.gi.Meta; const St = imports.gi.St; +const Atk = imports.gi.Atk; const DND = imports.ui.dnd; const IconGrid = imports.ui.iconGrid; @@ -33,12 +34,13 @@ const SearchResult = new Lang.Class({ content = new St.Bin({ style_class: 'search-result-content', reactive: true, can_focus: true, - track_hover: true }); + track_hover: true, + accessible_role: Atk.Role.PUSH_BUTTON }); let icon = new IconGrid.BaseIcon(this.metaInfo['name'], { createIcon: this.metaInfo['createIcon'] }); content.set_child(icon.actor); this._dragActorSource = icon.icon; - this.actor.label_actor = icon.label; + content.label_actor = icon.label; } else { if (content._delegate && content._delegate.getDragActorSource) this._dragActorSource = content._delegate.getDragActorSource();